libxl: suspend: Return correct error from callbacks
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 20 Dec 2013 12:49:53 +0000 (12:49 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 26 Jun 2015 15:53:50 +0000 (16:53 +0100)
commit72e00fb6c9e5a93f4001cf98fd3a7064be53a9a0
tree890ff77a5011b37430d607001acb635c9ddaf31b
parent9cceade9fed78425019ffaf192b1254f50f2d79c
libxl: suspend: Return correct error from callbacks

If a suspend callback fails, it has a libxl error code in its hand.
However we must return to libxc the values that libxc expects.  So we
stash the libxl error code in dss->rc and fish it out again after
libxc returns from the suspend call.

While we're here, abolish the now-redundant `ok' variable in
remus_devices_postsuspend_cb.

The overall functional change is that libxl_domain_save now completes
with the correct error code as determined when the underlying failure
happened.  (Usually this is, still, ERROR_FAIL.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Add cleanup in remus_devices_postsuspend_cb.
tools/libxl/libxl_dom.c
tools/libxl/libxl_internal.h